<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie6">
<![endif]--><!--[if IE 7 ]>
<html class="ie7"><![endif]-->
<!--[if IE 8 ]><html class="ie8">
<![endif]--><!--[if IE 9 ]>
<html class="ie9"><![endif]-->
	<!--[if (gt IE 9)|!(IE)]><![endif]-->
<!--<![endif]--><!--STaTUS OK -->
<html>
	<head lang="zh-cmn-hans">
		<meta charset="utf-8" />
		<title>湖北楚悠行网络科技有限公司-用户中心-登录</title>	
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" href="/static/index/css/amazeui.min.css" />
		<link rel="stylesheet" href="/static/index/css/style.css" />
		<script type="text/javascript" src="/static/index/js/jquery-1.9.1.min.js"></script>
		<script type="text/javascript" src="/static/index/js/amazeui.min.js"></script>
		<script type="text/javascript" src="/static/admin/plugin/layer/layer.js"></script>
		<link rel="stylesheet" href="/static/index/css/login.css" />
		<link rel="stylesheet" href="/static/index/css/mui.min.css" />
		<script type="text/javascript" src="/static/index/js/mui.min.js" ></script>
		<script type="text/javascript" src="/static/index/js/login.js" ></script>
		<style>

.content {
	margin: 0px auto;
	width: 100%;
	background-color: #fff;
	border: 1px solid #ddd;
	background-image: url(/static/index/img/banner.jpg);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 100% auto;

}
			
		</style>
	</head>
     
	<body>
	
		<div class="am-g">
			<div class="clearfix in-public core-2">
				<div class="logo" >
					
				</div>

			</div>
		</div>
		<div class="am-g content"  style="margin-top: 43px;">
			<div style="width:1200px;margin:0 auto;position: relative;z-index: 999;" class="clearfix">
				<div class="loginDiv " style="display: block;"  id="login" >

					<form id="login_form">
						<div class="am-u-sm-12" style="padding-right: 0rem">
							<img src="/static/index/img/erweima.png" style="float: right;height: 58px;" id="loginimg"/ >
							</div>
						<div class="am-u-sm-12" style="padding-left: 30px;padding-right: 30px;">
						<h4 style="font-weight: normal;">欢迎登录</h4>
						<span class="left1"></span>	<input type="text" class="am-form-field"  placeholder="手机号" style="padding-left: 50px;margin-top: 48px;font-size: 12px;" name="tel"/>
					 </div>

					 <div class="am-u-sm-12" style="margin-top: 21px;padding-left: 30px;padding-right: 30px;">
					  <span class="left2"></span>
						 <input type="password" class="am-form-field" name="password" placeholder="请输入密码"style="padding-left: 50px;font-size: 12px;"/>
					 </div>

					<div class="am-u-sm-12" style="margin-top: 45px;padding-left: 30px;padding-right: 30px;">
					<button type="button" id="login_button" class="am-btn am-btn-warning" style="width: 100%;border-radius: 5px;font-size: 16px;" >登录</button>
					</div>

					<div class="am-u-sm-12" style="padding-left: 30px;padding-right: 30px;">
						<p style="width: 100%;margin-top: 15px;font-size: 12px;color: #333333;"><a href="">忘记登录密码</a><span style="float: right;"><a href="<?=url('index/login/register')?>">免费注册</a></span></p>
					</div>

					</form>
				</div>
				<!--扫码页面-->
				<div class="loginDiv" style="display: none;" id="erm"  >
						<div class="am-u-sm-12" style="padding-right: 0rem">
						<img src="/static/index/img/pc_2.png" style="float: right;" id="ermimg" />						
						</div>
					<div class="am-u-sm-12" style="padding-left: 30px;padding-right: 30px;margin-top: 30px;text-align: center;">
					<h4 >手机扫码，访问手机端</h4>
				</div>	
				 <div class="am-u-sm-12" style="padding-left: 30px;padding-right: 30px;margin-top: 50px;text-align: center;">
				 <img src="/static/index/img/aerweima.png" />
				 </div>	
				 
				 <div class="am-u-sm-12" style="margin-top: 50px;padding-left: 30px;padding-right: 30px;text-align: center;">
				  <p style="font-size: 14px;">请使用手机端端扫描二维码访问移动端</p>
				    <p style="text-align: center;"><span style="background-image: url(img/Download-512.png);float: left;width: 20px;height: 20px;margin-top:5px;background-repeat: no-repeat;margin-left: 100px;"></span>
				<a style="float: left;font-size: 12px;">访问移动端</a></p> 
				 </div>	
				<div class="am-u-sm-12" style="margin-top: 10px;padding-left: 30px;padding-right: 30px;margin-bottom: 100px;">
				</div>
				
				</div>
			</div>
		</div>
		
		<div class="am-g " style="margin-top: 80px;text-align: center;font-size: 12px;">
			<div class="bottomLine" style="margin:0 auto;width:700px;height: 35px;">
				<span style="word-spacing:0.52rem;    text-align: center; width: 100%;"><a href="#">关于我们</a> | <a href="#">联系我们</a> | <a href="#">商家入驻</a> | <a href="#">友情链接</a> | <a href="#">站点地图</a> | <a href="#">手机商城</a> | <a href="#">企业文化</a> | <a href="#">帮助中心</a> </span>
			</div>
		</div>
		<div class="am-g">
			<div class="bot ">
				<div style="margin:0 auto;width:600px;height: 30px;">
					<p style="font-size: 12px; text-align: center;">© &nbsp;2018-2019 楚悠行 版权所有 ，并保留所有权利 <span style="margin: 0 10px;">楚悠行 Tel ：4008-588-859</span><span>E-mai：maila@163.com</span> </p>
				</div>
			</div>
		</div>

	</body>

</html>

<script>
	$('#login_button').click(function(){
		login();
	});
	function login(){
		var tel = $('input[name="tel"]').val();
		let action = "<?=input('action','login')?>";
		let returnURL = "<?=input('returnUrl')?>";

		var password = $('input[name="password"]').val();
		if(!tel){
			layer.msg('手机号不能为空');
			return false;
		}

		if(!password){
			layer.msg('密码不能为空');
			return false;
		}

		var data = $('#login_form').serialize();

		$.ajax({
			url:"<?=url('index/login/login')?>",
			type:'post',
			data:data,
			dataType:'json',
			success:function(data){
				//console.log(data);
				if(data.code == 300){
					layer.msg(data.msg);
				}else{
					//setSessionSave('access_token',data.data.access_token);
					//setSessionSave('user',data.data);
					if(returnURL){
						window.location.href = returnURL;
					}else if(action == 'seller_login') {
						window.location.href = "<?=url('seller/index/index')?>";
					}else{
						window.location.href = "<?=url('index/member/index')?>";
					}
				}
			},
			error:function(data){

			}
		});
	}
</script>